

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>Ceph 文件系统 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
        <script src="../_static/jquery.js"></script>
        <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../genindex/" />
    <link rel="search" title="Search" href="../search/" />
    <link rel="next" title="创建 Ceph 文件系统" href="createfs/" />
    <link rel="prev" title="SDK for Ceph Object Classes" href="../rados/api/objclass-sdk/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">Ceph 文件系统</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../_sources/cephfs/index.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Ceph 文件系统</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#cephfs">CephFS 入门</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id4">管理</a><ul>
<li class="toctree-l3"><a class="reference internal" href="createfs/"> 创建 CephFS 文件系统</a></li>
<li class="toctree-l3"><a class="reference internal" href="administration/"> 管理命令</a></li>
<li class="toctree-l3"><a class="reference internal" href="multifs/"> 创建多个文件系统</a></li>
<li class="toctree-l3"><a class="reference internal" href="add-remove-mds/"> 配备、增加、删除 MDS</a></li>
<li class="toctree-l3"><a class="reference internal" href="standby/">术语</a></li>
<li class="toctree-l3"><a class="reference internal" href="standby/#mds">MDS 守护进程的引用</a></li>
<li class="toctree-l3"><a class="reference internal" href="standby/#id3">故障切换的管理</a></li>
<li class="toctree-l3"><a class="reference internal" href="standby/#standby-replay">热备（ standby-replay ）的配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="standby/#mds-join-fs">配置 MDS 与文件系统的亲和性</a></li>
<li class="toctree-l3"><a class="reference internal" href="cache-configuration/"> MDS 缓存配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="mds-config-ref/"> MDS 配置选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../man/8/ceph-mds/"> ceph-mds 手册页</a></li>
<li class="toctree-l3"><a class="reference internal" href="nfs/"> 通过 NFS 导出</a></li>
<li class="toctree-l3"><a class="reference internal" href="app-best-practices/"> 应用最佳实践</a></li>
<li class="toctree-l3"><a class="reference internal" href="fs-volumes/"> FS 卷和子卷</a></li>
<li class="toctree-l3"><a class="reference internal" href="quota/"> CephFS 配额管理</a></li>
<li class="toctree-l3"><a class="reference internal" href="health-messages/"> 健康消息</a></li>
<li class="toctree-l3"><a class="reference internal" href="upgrading/">升级 MDS 集群</a></li>
<li class="toctree-l3"><a class="reference internal" href="upgrading/#firefly-jewel">升级比 Firefly 老的文件系统，需过 Jewel 这个槛</a></li>
<li class="toctree-l3"><a class="reference internal" href="cephfs-top/"> CephFS Top 工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="snap-schedule/"> 定时快照</a></li>
<li class="toctree-l3"><a class="reference internal" href="cephfs-mirroring/"> CephFS 快照镜像</a></li>
<li class="toctree-l3"><a class="reference internal" href="purge-queue/"> 清理队列</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id5">挂载 CephFS</a><ul>
<li class="toctree-l3"><a class="reference internal" href="client-config-ref/"> 客户端配置选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="client-auth/"> 客户端认证</a></li>
<li class="toctree-l3"><a class="reference internal" href="mount-prerequisites/"> 挂载 CephFS: 前提条件</a></li>
<li class="toctree-l3"><a class="reference internal" href="mount-using-kernel-driver/"> 用内核驱动挂载 CephFS 文件系统</a></li>
<li class="toctree-l3"><a class="reference internal" href="mount-using-fuse/"> 用 FUSE 挂载 CephFS</a></li>
<li class="toctree-l3"><a class="reference internal" href="ceph-dokan/"> 在 Windows 上挂载 CephFS</a></li>
<li class="toctree-l3"><a class="reference internal" href="../man/8/cephfs-shell/"> CephFS Shell 的用法</a></li>
<li class="toctree-l3"><a class="reference internal" href="kernel-features/"> 内核驱动支持的功能</a></li>
<li class="toctree-l3"><a class="reference internal" href="../man/8/ceph-fuse/"> ceph-fuse 手册页</a></li>
<li class="toctree-l3"><a class="reference internal" href="../man/8/mount.ceph/"> mount.ceph 手册页</a></li>
<li class="toctree-l3"><a class="reference internal" href="../man/8/mount.fuse.ceph/"> mount.fuse.ceph 手册页</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id6">CephFS 内幕</a><ul>
<li class="toctree-l3"><a class="reference internal" href="mds-states/"> MDS 的各种状态</a></li>
<li class="toctree-l3"><a class="reference internal" href="posix/"> POSIX 兼容性</a></li>
<li class="toctree-l3"><a class="reference internal" href="mds-journaling/"> MDS 日志记录</a></li>
<li class="toctree-l3"><a class="reference internal" href="file-layouts/"> 文件布局</a></li>
<li class="toctree-l3"><a class="reference internal" href="mdcache/"> 分布式元数据缓存</a></li>
<li class="toctree-l3"><a class="reference internal" href="dynamic-metadata-management/"> CephFS 内的动态元数据管理</a></li>
<li class="toctree-l3"><a class="reference internal" href="cephfs-io-path/"> CephFS IO 路径</a></li>
<li class="toctree-l3"><a class="reference internal" href="charmap/"> 大小写敏感和规范化</a></li>
<li class="toctree-l3"><a class="reference internal" href="lazyio/"> LazyIO</a></li>
<li class="toctree-l3"><a class="reference internal" href="dirfrags/"> 目录分片的配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="multimds/"> 多活 MDS 的配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="snapshots/"> 快照</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id7">故障排除和灾难恢复</a><ul>
<li class="toctree-l3"><a class="reference internal" href="eviction/"> 驱逐客户端</a></li>
<li class="toctree-l3"><a class="reference internal" href="scrub/"> 洗刷</a></li>
<li class="toctree-l3"><a class="reference internal" href="full/"> 文件系统占满的处理</a></li>
<li class="toctree-l3"><a class="reference internal" href="disaster-recovery-experts/"> 元数据修复</a></li>
<li class="toctree-l3"><a class="reference internal" href="troubleshooting/"> 故障排除</a></li>
<li class="toctree-l3"><a class="reference internal" href="disaster-recovery/"> 灾难恢复</a></li>
<li class="toctree-l3"><a class="reference internal" href="cephfs-journal-tool/"> cephfs-journal-tool</a></li>
<li class="toctree-l3"><a class="reference internal" href="recover-fs-after-mon-store-loss/"> 监视器存储丢失后恢复文件系统</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id8">开发者指南</a><ul>
<li class="toctree-l4"><a class="reference internal" href="journaler/"> Journaler 配置</a></li>
<li class="toctree-l4"><a class="reference internal" href="capabilities/"> 客户端的能力</a></li>
<li class="toctree-l4"><a class="reference internal" href="api/"> Java 和 Python 捆绑库</a></li>
<li class="toctree-l4"><a class="reference internal" href="mantle/"> Mantle</a></li>
<li class="toctree-l4"><a class="reference internal" href="metrics/">指标</a></li>
<li class="toctree-l4"><a class="reference internal" href="metrics/#id3">查看指标</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id9">更多细节</a><ul>
<li class="toctree-l3"><a class="reference internal" href="experimental-features/"> 实验性功能</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="ceph">
<span id="ceph-file-system"></span><h1>Ceph 文件系统<a class="headerlink" href="#ceph" title="Permalink to this heading"></a></h1>
<p>Ceph 文件系统、或者 <strong>CephFS</strong> ，是个与 POSIX 标准兼容的文件系统，
它建立在 Ceph 的分布式对象存储 -- <strong>RADOS</strong> 之上。
CephFS 致力于为各种应用程序（包括传统应用场景，
像共享家目录、 HPC 暂存空间、和分布式工作流的共享存储），
提供技术先进的、多用途的、高可用的、而且性能优异的文件存储功能</p>
<p>CephFS 通过采用一些新颖的架构实现了这些目标。
特别是，文件元数据存储在与文件数据相独立的 RADOS 存储池内、
并通过尺寸可变的 <em>元数据服务器</em> （缩写 <strong>MDS</strong> ）集群来提供服务，
集群扩容就能支持更高的元数据载荷吞吐量。
这个文件系统的客户端是直连到 RADOS 来读取和写入文件数据块的。
正因为这样，工作载荷可以随底层 RADOS 存储的规模线性增长；
就是说，没有网关或者代理为客户端转接数据 I/O 。</p>
<p>到数据的访问是通过集群的 MDS 来协调的，
客户端和 MDS 共同维护分布式的元数据缓存，而 MDS 是权威。
对元数据的变更由各个 MDS 汇总成一系列、并高效地写入 RADOS 内的日志；
MDS 本身不会存储元数据状态。这种模式使客户端们能够连贯且快速地协作，
而且还是在 POSIX 文件系统的范畴内。</p>
<img alt="../_images/cephfs-architecture.svg" src="../_images/cephfs-architecture.svg" /><p>CephFS 因其新颖的设计、和对文件系统的研究而成了很多学术论文的主题。
它是 Ceph 里最老的存储接口，而且曾经还是 RADOS 的主要用途。
现在，又加入了两个其它的存储接口，形成了一个现代的、大一统的存储系统：
RBD （ Ceph 块设备）和 RGW （Ceph 对象存储网关）。</p>
<section id="cephfs">
<h2>CephFS 入门<a class="headerlink" href="#cephfs" title="Permalink to this heading"></a></h2>
<p>对绝大多数部署好的 Ceph ，建立一个 CephFS 文件系统都如此简单：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><style type="text/css">
span.prompt1:before {
  content: "$ ";
}
</style><span class="prompt1"><span class="c1"># Create a CephFS volume named (for example) &quot;cephfs&quot;:</span></span>
<span class="prompt1">ceph<span class="w"> </span>fs<span class="w"> </span>volume<span class="w"> </span>create<span class="w"> </span>cephfs</span>
</pre></div></div><p>如果后端的部署技术支持的话（见 <a class="reference external" href="../mgr/orchestrator/#current-implementation-status">Orchestrator 部署表</a> ），
Ceph <a class="reference external" href="../mgr/orchestrator">Orchestrator</a> 会自动给你的文件系统创建和配置 MDS ，
否则，请 <a class="reference external" href="add-remove-mds">根据需要手动部署 MDS</a> 。你还可以<a class="reference external" href="fs-volumes">创建其他 CephFS 卷</a>。</p>
<p>最后，要想在你的客户端节点上挂载 CephFS ，参见 <a class="reference external" href="mount-prerequisites">挂载 CephFS ：先决条件</a> 。
另外，还有一个命令行的 shell 工具，可以用 <a class="reference external" href="cephfs-shell">cephfs-shell</a> 交互地访问或者编写脚本。</p>
<!---</section>
<section id="id4">
<h2>管理<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h2>
---><div class="toctree-wrapper compound">
</div>
<!---</section>
<section id="id5">
<h2>挂载 CephFS<a class="headerlink" href="#id5" title="Permalink to this heading"></a></h2>
---><div class="toctree-wrapper compound">
</div>
<!---</section>
<section id="id6">
<h2>CephFS 内幕<a class="headerlink" href="#id6" title="Permalink to this heading"></a></h2>
---><div class="toctree-wrapper compound">
</div>
<!---</section>
<section id="id7">
<h2>故障排除和灾难恢复<a class="headerlink" href="#id7" title="Permalink to this heading"></a></h2>
---><div class="toctree-wrapper compound">
</div>
<!---<section id="id8">
<h3>开发者指南<a class="headerlink" href="#id8" title="Permalink to this heading"></a></h3>
---><div class="toctree-wrapper compound">
</div>
<!---</section>
</section>
<section id="id9">
<h2>更多细节<a class="headerlink" href="#id9" title="Permalink to this heading"></a></h2>
---><div class="toctree-wrapper compound">
</div>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../rados/api/objclass-sdk/" class="btn btn-neutral float-left" title="SDK for Ceph Object Classes" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="createfs/" class="btn btn-neutral float-right" title="创建 Ceph 文件系统" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>